﻿using System;
using System.Web.UI;
using Mobile.Web.DataAccess;
using Mobile.WebControls.Field;

namespace Mobile.Web.Form
{
    public partial class CheckboxPage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Control control = ControlHelper.GetControlById(mbPage1, "cbCars");
            Control control2 = ControlHelper.GetControlById(mbPage1, "cbCars2");
            if ((control is CheckboxList) && (control2 is CheckboxList))
            {
                CheckboxList cb = control as CheckboxList;
                CheckboxList cb2 = control2 as CheckboxList;
                cb.DataSource = CarDataAccess.GetCars();
                cb2.DataSource = CarDataAccess.GetCars();
                cb.DataBind();
                cb2.DataBind();
            }
        }
    }
}